# 制作数据集
from matplotlib import pyplot as plt
import torch
ax = plt.gca()
x = torch.tensor([-2.7920,-2.2356,-1.8285,-1.7755,-1.7408,-1.0992,
                     -0.9828,-0.9527,-0.2743,-0.2406,-0.0918, 0.1785,
                     0.2922, 0.3702,0.3957, 0.4205, 0.5041, 0.5499,
                     0.6154, 0.9958, 1.2607, 1.2784, 1.4159, 1.9559])
y_target = 0.5*x**1 + 3.*x**2 + 0.4*x**3
ax.plot(x, y_target.numpy(),'ob')
plt.xlabel('X')
plt.ylabel('y')
plt.show()
